<template>
	<view>
		<u-tabs :list="list1" @change="change" :current="current" active-color="#FF7200" inactive-color="#333333"></u-tabs>
		<view class="Order" v-if="current==0">
			<all-order></all-order>
		</view>
		<view class="Order" v-if="current==1">
			<delivery></delivery>
		</view>
		<view class="Order" v-if="current==2">
			<received></received>
		</view>
		<view class="Order" v-if="current==3">
			<take-over></take-over>
		</view>
	</view>
</template>

<script>
	import allOrder from './allOrder'//全部订单
	import delivery from './delivery'//待发货
	import received from './received'//待收货
	import takeOver from './takeOver'//已收货
	export default {
		components:{
			allOrder,
			takeOver,
			received,
			delivery
		},
		data() {
			return {
				list1: [{
					name: '全部',
				}, {
					name: '待发货',
				}, {
					name: '待收货'
				}, {
					name: '已收货'
				}],
				current: 0,
			}
		},
		onLoad(options) {
			this.current = options.current
		},
		methods: {
			change(item) {
				this.current = item
			}
		}
	}
</script>

<style lang="less" scoped>
/deep/.u-tab-bar {
	display: none;
}
/deep/.u-tab-item{
	padding: 0 50rpx !important;
}
/deep/.u-tabs {
	background-color: #EFEFEF !important;
}
.Order{
	width: 100%;
	height: 100%;
	padding: 40rpx;
}
</style>
